<%-- 
    Document   : advancedSearch
    Created on : Sep 4, 2013, 11:44:29 PM
    Author     : Thai Ha Cong
--%>

<%@page import="model.Category"%>
<%@page import="java.util.List"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Advanced Searching</title>
        <link href="css/style.css" rel="stylesheet" type="text/css"/>
    </head>
    <body>
        <div class="headerbg">
            <%@include file="include/iHeader.jsp" %>
        </div>
        <div class="contentbg">
            <div class="content">
                <div class="advancedSearch">
                    <h1>Advanced Product Search</h1>
                    <s:form action="advancedSearchProduct">
                        <!--s:textfield name="brand" label="Brand" size="26" value="" /-->
                        <s:select name="brand" label="Brand" cssStyle="width: 178px" list="allBrands" />
                        <s:select name="categoryid" label="Category" cssStyle="width: 178px" list="allCategories" />
                        <s:textfield name="productName" label="Product Name" size="26" />

                        <s:textfield name="color" label="Color" size="26"/>
                        <s:select name="screen" label="Screen Size" cssStyle="width: 178px" list="allScreenSize" />
                        <s:select name="storage" label="Storage" cssStyle="width: 178px" list="allStorage" />
                        <s:select name="camera" label="Camera" cssStyle="width: 178px" list="allCamera" />
                        <s:select name="warranty" label="Warranty" cssStyle="width: 178px" list="allWarranty" />
                        <s:select name="os" label="Operating System" cssStyle="width: 178px" list="allOS" />
                        
                        <s:textfield name="minPrice" label="From Price" size="26" value="0" />
                        <s:textfield name="maxPrice" label="To Price" size="26" value="1000" />
                        <s:select name="sort" label="Sort by" cssStyle="width: 178px" list="{'Product Name', 'Ascending Price', 'Descending Price', 'Product Brand'}" />
                        <s:reset value="Reset" cssStyle="width: 120px" />
                        <s:submit value="Search" cssStyle="width: 120px" />
                    </s:form>
<!--                    <select name="category" style="width: 178px">
                        <option value="0">All</option>
                        <%
                            List<Category> categories = (List<Category>) session.getAttribute("categories");

                            for (Category c : categories) {
                                out.println("<option value='" + c.getIdCategory() + "'>" + c.getName() + "</option>");
                            }
                        %>
                    </select>-->
                </div>
            </div>
        </div>
        <div class="footerbg">
            <%@include file="include/iFooter.jsp" %>
        </div>
    </body>
</html>